package com.ffggffgfv.backend.entity;

import java.util.Date;
import java.util.List;

/**
 * 权限实体类
 */
public class Permission {

    private Long id;             // 主键ID
    private String name;         // 权限名称
    private String code;         // 权限编码
    private Integer type;        // 权限类型（1-菜单 2-按钮）
    private Long parentId;       // 父级ID
    private String path;         // 路径
    private Date createTime;     // 创建时间
    private List<Permission> children; // 子权限列表（非数据库字段）

    // Getter and Setter methods
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public List<Permission> getChildren() {
        return children;
    }

    public void setChildren(List<Permission> children) {
        this.children = children;
    }
}
